unit ufTestFocusCtrl;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, uiWizard, StdCtrls;

type
  TTestFocusCtrl = class(TForm,IWizardPage,IWizardFocusControl,IWizardNextPage)
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    lbl1: TLabel;
  private
    { Private declarations }
    fWizMgr : IWizardManager;
  public
    function InitialFocusControl: TWinControl;
    procedure NextPageEvent;
    procedure SetWizardManager(Mgr: IWizardManager);
    { Public declarations }

  end;

var
  TestFocusCtrl: TTestFocusCtrl;

implementation

{$R *.dfm}

{ TTestFocusCtrl }

function TTestFocusCtrl.InitialFocusControl: TWinControl;
begin
  Result := Edit2;
end;

procedure TTestFocusCtrl.NextPageEvent;
begin
  fWizMgr.NavigateToPage('TTestPopStackToPage');
end;

procedure TTestFocusCtrl.SetWizardManager(Mgr: IWizardManager);
begin
  fWizMgr := Mgr;
  fWizMgr.SetNextEnabled(True);
end;

initialization
  RegisterClass(TTestFocusCtrl);

end.
